from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton, QWidget
from ui.MainWindow import Ui_MainWindow
from PyQt5 import uic
import sys

# # Way #1
# class MyMainWindow(QMainWindow):
#     def __init__(self):
#         super().__init__()
#         self.ui = Ui_MainWindow()
#         self.ui.setupUi(self)
#
# if __name__ == '__main__':
#     app = QApplication(sys.argv)
#     win = MyMainWindow()
#     win.show()
#     sys.exit(app.exec_())

# Way #2
if __name__ == '__main__':
    # create application
    app = QApplication(sys.argv)
    win = QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(win)
    win.show()
    sys.exit(app.exec_())

# Way #3
# class MyClass:
#     ui = uic.loadUi('./ui/MainWindow.ui')
#
#     def __init__(self):
#         pass
#
#
# MyClass.ui.show()
# app.exec_()
